package com.code.google.mdsc.model;

import java.math.BigDecimal;
import java.util.GregorianCalendar;

/**
 * Encapsulates the data of a {@link Debtor} needed to create the valid data for
 * the payment section of an pain.008.002.02 conform XML document.
 * 
 */
public interface Debtor {

	/**
	 * 
	 * @return the IBAN
	 */
	public String getIBAN();

	/**
	 * 
	 * @return the BIC
	 */
	public String getBIC();

	/**
	 * 
	 * @return the mandate
	 */
	public String getMandate();

	/**
	 * 
	 * @return the name of the account holder
	 */
	public String getAccountHolder();

	/**
	 * 
	 * @return the booking volume
	 */
	public BigDecimal getBookingVolume();

	/**
	 * 
	 * @return the signature date of the mandate
	 */
	public GregorianCalendar getMandateSignatureDate();

	/**
	 * 
	 * @return the purpose
	 */
	public String getUnstructuredPurpose();

	/**
	 * 
	 * @param purpose
	 *            It must not be <code>null</code>, an empty string or longer
	 *            than 140 characters.
	 * 
	 * @throws IllegalArgumentException
	 *             If the given parameter is invalid.
	 */
	public void setUnstructuredPurpose(String purpose);

	/**
	 * 
	 * @param mandatorySignatureDate
	 *            It must not be <code>null</code>.
	 * 
	 * @throws IllegalArgumentException
	 *             If the given parameter is invalid.
	 */
	public void setMandateSignatureDate(GregorianCalendar mandatorySignatureDate);

	/**
	 * 
	 * @param iban
	 *            It must not be <code>null</code> or an empty string.
	 * 
	 * @throws IllegalArgumentException
	 *             If the given parameter is invalid.
	 */
	public void setIBAN(String iban);

	/**
	 * 
	 * @param bic
	 *            It must not be <code>null</code> or an empty string.
	 * 
	 * @throws IllegalArgumentException
	 *             If the given parameter is invalid.
	 */
	public void setBIC(String bic);

	/**
	 * 
	 * @param mandate
	 *            It must not be <code>null</code> or an empty string.
	 * 
	 * @throws IllegalArgumentException
	 *             If the given parameter is invalid.
	 */
	public void setMandate(String mandate);

	/**
	 * 
	 * @param accountHolder
	 *            It must not be <code>null</code> or an empty string.
	 * 
	 * @throws IllegalArgumentException
	 *             If the given parameter is invalid.
	 */
	public void setAccountHolder(String accountHolder);

	/**
	 * The booking volume in cent.
	 * 
	 * @param bookingVolumne
	 *            It must be <code>greater than zero</code>.
	 * 
	 * @throws IllegalArgumentException
	 *             If the given parameter is invalid.
	 */
	public void setBookingVolume(BigDecimal bookingVolumne);

	/**
	 * 
	 * @return the sequence type code
	 */
	public String getSequenceType();

	/**
	 * The {@link SequenceType1Code sequence type}
	 * 
	 * TODO valid values
	 * 
	 * @param sequenceType
	 *            Valid values are: <code>FRST</code>, <code>RCUR</code>
	 * 
	 * @throws IllegalArgumentException
	 *             if the given parameter is invalid.
	 */
	public void setSequenceType(String sequenceType);
}
